﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp5
{
    class Program
    {
        public struct PersonStruct
        {
            public string name;
            public int telephone;
            public string add;

            public PersonStruct(string name, int telephone, string add)
            {
                this.name = name;
                this.telephone = telephone;
                this.add = add;
            }

        }



            static void Main(string[] args)
            {
                PersonStruct p1 = new PersonStruct();
                p1.name = "张三";
                p1.telephone = 4548789;
                p1.add = "龙岩";

                PersonStruct p2 = new PersonStruct();
                p2 = p1;
                p2.name = "李四";
                Console.WriteLine("姓名：{0},电话：{1}，地址：{2}", p1.name, p1.telephone, p1.add);
                Console.WriteLine("姓名：{0},电话：{1}，地址：{2}", p2.name, p2.telephone, p2.add);

                PersonStruct p3 = new PersonStruct("王五", 546765306, "泉州");
                
                PersonClass p4 = new PersonClass(p3.name, p3.telephone, p3.add);
                p4.name = "赵六";
                Console.WriteLine("姓名：{0},电话：{1}，地址：{2}", p3.name, p3.telephone, p3.add);
                Console.WriteLine("姓名：{0},电话：{1}，地址：{2}", p4.name, p4.telephone, p4.add);
        }
    }
}
